<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户显示</title>

    <link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui-v2.5.6/css/layui.css" media="all" />
    <script src="https://www.layuicdn.com/layui-v2.5.6/layui.js"></script>

</head>
<body>
<div>
    <table class="layui-hide" id="test"></table>

</div>

</body>
<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

<script>
    layui.use('table', function(){
        var table = layui.table;

        table.render({
            elem: '#test'
            ,url: '/allUser'
            ,cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
            ,page:'false'
            ,cols: [[
                 {field:'name', width:80, title: '用户名'}
                ,{field:'bid', width:80, title: '班级', sort: true}
                ,{field:'url', width:80, title: 'url', sort: true}
                ,{fixed: 'right', title:'操作', toolbar: '#barDemo', width:150}
            ]]

        });
    });
</script>
</html>
